<?php
/**
* Scroll Feed Display - Joomla Module
* Version			: 1.2
* Created by		: http://rumahbelanja.com
* Created on		: December 15, 2008
* Updated on		: December 05, 2010
* Package			: Joomla 1.5.x
* License			: http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*/

/** ensure this file is being included by a parent file */
defined('_JEXEC') or die('Direct Access to this location is not allowed.');

// Include the syndicate functions only once
require_once (dirname(__FILE__).DS.'helper.php');

$rssurl	= $params->get('rssurl', '');
$rssrtl	= $params->get('rssrtl', 0);

//check if cache diretory is writable as cache files will be created for the feed
$cacheDir = JPATH_BASE.DS.'cache';
if (!is_writable($cacheDir))
{
	echo '<div>';
	echo JText::_('MAKECACHEDDIRWRITABLE');
	echo '</div>';
	return;
}

//check if feed URL has been set
if (empty ($rssurl))
{
	echo '<div>';
	echo JText::_('NOFEEDURL');
	echo '</div>';
	return;
}

$feed = modScrollFeedDisplayHelper::getFeed($params);
require(JModuleHelper::getLayoutPath('mod_scroll_feed_display'));
